package org.dragon.models;

import java.util.ArrayList;
import java.util.List;

/**
 * Author:     Zhao Yan
 * DateTime:   2023/5/23 9:08
 */
public class PrivilegeExtend {

    public Privilege privilege;

    public List<Permission> permissions = new ArrayList<>();

    public String[] getPermissions() {
        int length = permissions.size();
        String[] result = new String[length];

        for (int i = 0; i < length; i++) {
            Permission permission = permissions.get(i);
            result[i] = permission.getCode();
        }

        return result;
    }
}
